vcBooleanSignalMap

vcBoolSignalMap allows you to map Boolean signals to ports in a continuous IO space.

See in: Overview

Module: vcBehaviors

Parent: vcSignalMap

Children -

Referenced by: vcRobotExecutor.DigitalInputSignals, vcRobotExecutor.DigitalOutputSignals

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
AvailablePortsIntegerRWDefines the number of available ports in the signal map.
EndIndexIntegerRWDefines the end index of ports in the signal map. Its value is updated automatically when setting Ports or PortCount.
StartIndexIntegerRWDefines the start index of ports in the signal map. It can be used in conjunction with EndIndex to define the amount of ports in the signal map.

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
connectNoneInteger indexPort1,
vcBooleanSignalMap signalMap2,
Integer indexPort2
Creates a remote connection with another signal map or signal.
If a port is connected to a signal, refer to the abstract interface of the connection to disconnect only that signal.
See more
Otherwise, the disconnect() method will disconnect all signals connected to the port.
Signals in components can act as abstract interfaces between ports, sending and receiving information via signal maps.

See vcBooleanSignal for more information.

Parameters:
indexPort1 (int): Index of the first port.
signalMap2 (vcBooleanSignalMap): Other signal map.
indexPort2 (int): Other signal map port.

Exceptions:
RuntimeError: When value of the index is incorrect.
connectNoneInteger index,
vcBooleanSignal signal
Creates a remote connection with another signal map or signal.
If a port is connected to a signal, refer to the abstract interface of the connection to disconnect only that signal.
See more
Otherwise, the disconnect() method will disconnect all signals connected to the port.
Signals in components can act as abstract interfaces between ports, sending and receiving information via signal maps.

See vcBooleanSignal for more information.

Parameters:
index (int): Index of the port.
signal (vcBooleanSignal): Signal to connect.

Exceptions:
RuntimeError: When value of the index or signal is incorrect.
disconnectNoneInteger indexDisconnects a port at a given index from its connections.
See more
Parameters:
index (int): Port index to disconnect.

Exceptions:
RuntimeError: When value of the index is incorrect.
getAllConnectedPortslist[Integer]NoneGets a list of all connected ports in the signal map.

Returns:
List[int]: List of the connected ports.
getConnectedExternalPortslistInteger indexGets a list of all ports in other components connected to a local port at a given index in the signal map.
See more
Parameters:
index (int): Index of the port.

Returns:
List[Tuple[vcBooleanSignalMap, int]]: List of pairs of boolean signal map and port, empty list if nothing was found.

Exceptions:
RuntimeError: When value of the index is incorrect.
getConnectedExternalSignalsvcListInteger indexGets a list of all signals in other components connected to a local port at the given index in the signal map.
See more
Parameters:
index (int): Index of the port.

Returns:
List[vcBooleanSignal]: List of signals or empty list if nothing was found at the given index.

Exceptions:
RuntimeError: When value of the index is incorrect.
getInternalPortSignalvcBooleanSignalInteger indexReturns the signal connected to a port at given index; otherwise returns None.
See more
Parameters:
index (int):Index of the port.

Returns:
vcBooleanSignal: Signal connected to the given port index.

Exceptions:
RuntimeError: When value of the index is incorrect.
getSignalValueBooleanInteger indexGets the value of a port at a given index.
See more
Parameters:
index (int): Index of the port.

Returns:
bool: Value of a port at a given index.

Exceptions:
RuntimeError: When value of the index is incorrect.
setPortSignalNoneInteger index,
vcBooleanSignal signal
Sets the signal of a port at a given index.
An optional signal argument can be given to assign the port a signal in its component. Otherwise, the port is assigned a dynamic, application signal.
See more
Parameters:
index (int): Index of the port.
signal (vcBooleanSignal): Signal to set.

Exceptions:
RuntimeError: When value of the index is incorrect.
setSignalValueNoneInteger index,
Boolean value
Sets the value of a port at a given index to a given value.
See more
Parameters:
index (int): Index of a port.
value (bool): Value of the signal to set at the given port index.

Exceptions:
RuntimeError: When value of the index is incorrect.

Events

Learn how to use events here. The events are also inherited from the parent class.

NameParametersDescription
OnSignalTriggervcBooleanSignalMap signalMap,
int port,
bool value
Triggered when the value of a signal mapped to a port has a new value.
See more
Parameters:
signalMap (vcBooleanSignalMap): Signal map that triggered the event.
port (int): Target port.
value (bool): New value.